@using BTCPayServer.Controllers
@model BTCPayServer.Controllers.UIServerController.CreateTemporaryFileUrlViewModel
@{
    ViewData.SetLayoutModel(new LayoutModel(nameof(ServerNavPages.Services), StringLocalizer["Create temporary file link"])
        .SetCategory(WellKnownCategories.Server));
}

<form method="post">
    <div class="sticky-header">
        <h2>@ViewData["Title"]</h2>
		<button id="page-primary" type="submit" class="btn btn-primary" name="command" value="Generate" text-translate="true">Generate</button>
    </div>
    <partial name="_StatusMessage" />

    <div class="row">
        <div class="col-xl-8 col-xxl-constrain">
            @if (!ViewContext.ModelState.IsValid)
            {
                <div asp-validation-summary="All"></div>
            }
            <div class="form-group form-check">
                <input type="checkbox" class="form-check-input" asp-for="IsDownload"/>
                <label asp-for="IsDownload" class="form-check-label"></label>
                <span asp-validation-for="IsDownload" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="TimeAmount" class="form-label"></label>
                <div class="input-group">
                    <input type="number" inputmode="decimal" asp-for="TimeAmount" class="form-control">
                    <select asp-for="TimeType" asp-items="@Html.GetEnumSelectList<UIServerController.CreateTemporaryFileUrlViewModel.TmpFileTimeType>()" class="form-select"></select>
                </div>

                <span asp-validation-for="TimeAmount" class="text-danger"></span>
                <span asp-validation-for="TimeType" class="text-danger"></span>
            </div>
        </div>
    </div>
</form>

@section PageFootContent {
    <partial name="_ValidationScriptsPartial" />
}
